﻿Imports System.Windows.Forms

Public Class frmPengaturan

    Private Sub OK_Button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OK_Button.Click
        With My.Settings
            .BatchSize = numBatch.Value
            .Timeout = numWaktu.Value
            .ShowETA = CheckBox1.Checked
        End With

        Me.DialogResult = System.Windows.Forms.DialogResult.OK
        Me.Close()
    End Sub

    Private Sub Cancel_Button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Cancel_Button.Click
        Me.DialogResult = System.Windows.Forms.DialogResult.Cancel
        Me.Close()
    End Sub

    Private Sub frmPengaturan_Shown(sender As Object, e As System.EventArgs) Handles Me.Shown
        With My.Settings
            numBatch.Value = .BatchSize
            numWaktu.Value = .Timeout
            CheckBox1.Checked = .ShowETA
        End With
    End Sub
End Class
